package com.dw.best_base;

import android.graphics.Color;
import android.support.v4.content.ContextCompat;
import android.text.TextUtils;

import com.loper7.base.utils.BaseApplication;
import com.loper7.layout.TitleBar;

/**
 * @author LOPER7
 * @date 2018/5/2 15:42
 * @Description:
 */

public class App extends BaseApplication {
    private static App app;

    public static App getInstance() {
        return app;
    }

    @Override
    protected void init() {
        super.init();
        app = this;

        TitleBar.getConfig()
                .setTitleTextSize(getApplicationContext(), 18)
                .setTitleTextColor(ContextCompat.getColor(getApplicationContext(), R.color.colorTextBlack))
                .setMenuTextSize(getApplicationContext(), 14)
                .setMenuTextColor(ContextCompat.getColor(getApplicationContext(), R.color.colorTextGrayDark))
                .setPadding(getApplicationContext(), 16)
                .setCenterTitle(false)
                .setUseRipple(true)
                .setTitleEllipsize(TextUtils.TruncateAt.MARQUEE)
                .setBackgroundColor(Color.WHITE)
                .setBorderColor(ContextCompat.getColor(getApplicationContext(), R.color.colorBorder))
                .setShowBorder(true)
                .setBorderWidth(getApplicationContext(), 0.6f);

    }

}


